package com.topsoft.micro.config.handler;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.security.core.Authentication;
import org.springframework.security.web.authentication.SavedRequestAwareAuthenticationSuccessHandler;
import org.springframework.stereotype.Component;

/**
 *  手机端
 * @author guokaige
 *
 */
@Component("myOwnSavedRequestAwareAuthenticationSuccessHandler")
public class MyOwnSavedRequestAwareAuthenticationSuccessHandler extends SavedRequestAwareAuthenticationSuccessHandler {

    private Logger logger = LoggerFactory.getLogger(getClass());
    



    @Override
    public void onAuthenticationSuccess(HttpServletRequest request, HttpServletResponse response, Authentication authentication) throws IOException, ServletException {
    	logger.info("登录成功");
    	
       //  String  authenticationStr= FastJsonUtil.fastJsonSerialize(authentication);
		 
	  // 	 System.out.println("````````myOwnSavedRequestAwareAuthenticationSuccessHandler``````````"+authenticationStr);
       
    	super.onAuthenticationSuccess(request, response, authentication);

    }

    
    
    
    

   
}
